import {Component} from 'react'
import './App.css';
// let that = null
// jsx
class App extends Component {
  constructor() {
    super()
    // that = this
    this.state = {
      name: "德玛西亚"
    }
  }
  fun = (e) => {
    // console.log(this)
    // this.state.name = "诺克萨斯"
    this.setState({
      name: "诺克萨斯"
    })
  }
  render() {
    const a = "你是个麻瓜"
    return (
      <div className="App">
        {a}
        {this.state.name}
        <button onClick={this.fun}>点击</button>
      </div>
    );
  }
}
export default App;
